<template>
	<view>
		<view class="bg-white padding">
			<view class="text-xl text-center" style="display: flex;">
				<u-avatar :src="userinfo.avatar"></u-avatar>
				<u--text type="primary" :text="userinfo.nickname"></u--text>
			</view>
			<view class="text-xl text-center">
				<u-button type="primary" :plain="true" text="系统信息" @click="update"></u-button>
			</view>
			<view class="text-xl text-center">
				<u-button type="primary" :plain="true" text="退出" @click="logout"></u-button>
			</view>
		</view>
	</view>
</template>
<script>
	import {
		indexlist,
		reporthongshu,
		reportdownload
	} from "@/nxTemp/apis/login.js"
	export default {
		components: {},
		data() {
			return {
				userinfo: {}
			};
		},
		onShow() {
			this.userinfo = uni.getStorageSync('user')
		},
		onLoad() {
			this.userinfo = uni.getStorageSync('user')
		},
		methods: {
			logout() {
				uni.removeStorageSync('token');
				indexlist('').then();
			},
			update() {
				// uni.$emit('updatesys', {
				// 	msg: '页面更新'
				// })
				uni.navigateTo({
					url:'/pages/me/setting'
				})
				
			}
		}
	}
</script>

<style lang="scss" scoped>

</style>